package cn.iphone.NPlayer.fegin;

import cn.iphone.NPlayer.CourseDoc;
import cn.iphone.NPlayer.fallback.CourseEsServiceFallbackFactory;
import cn.iphone.NPlayer.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "CourseEsService", value = "service-search",path = "/courseEs",
        fallbackFactory = CourseEsServiceFallbackFactory.class)
public interface CourseEsService {

    @PostMapping("/onLineCourse")
    JSONResult saveCourseEs(@RequestBody CourseDoc courseDoc);

    @PostMapping(value = "/offLineCourse/{courseId}")
    JSONResult offLineCourse(@PathVariable("courseId") Long courseId);

}
